<?php

class DefaultController extends AController {

    public function actionIndex() {
        $this->render('index');
    }

    public function actionError() {
        $error = Yii::app()->errorHandler->error;

        if ($error) {
            if (Yii::app()->request->isAjaxRequest)
                echo $error['message'];
            else
                $this->render('error', array(
                  'error' => $error,
                ));
        }
    }

    public function actionTest() {
        header('Content-type: text/html; charset=UTF-8');
        MyHelpers::testVar($_SESSION);
    }

}